package com.baize.baizeapp.test.chat

import android.content.Context
import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.baize.baizeapp.R

class ConversationActivity : AppCompatActivity() {

    companion object{
        fun open(context: Context, uid: String) {
            val intent = Intent(context, ChatActivity::class.java)
            intent.putExtra("uid",uid)
            context.startActivity(intent)
        }
    }

    val uid : String by lazy {
        intent.getStringExtra("uid") ?: ""
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_conversation)
        if (uid.isEmpty()) finish()

    }
}